//package com.xjk.cloud.config;
//
//import com.alibaba.druid.pool.DruidDataSource;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.annotation.Primary;
//import org.springframework.stereotype.Component;
//
//import javax.sql.DataSource;
//
////@ConfigurationProperties(prefix = "spring.datasource")
//@Configuration
//public class DataSourceConfiguration {
//
//    @Value("${spring.application.datasource.driver-class-name}")
//    private String driverClassName;
//    @Value("${spring.application.datasource.username}")
//    private String username;
//    @Value("${spring.application.datasource.password}")
//    private String password;
//    @Value("${spring.application.datasource.url}")
//    private String url;
//
//    @Bean
//    @Primary
//    @Qualifier
//    public DataSource getDataSource() {
//        DruidDataSource dataSource = new DruidDataSource();
//        dataSource.setDriverClassName(driverClassName);
//        dataSource.setUsername(username);
//        dataSource.setPassword(password);
//        dataSource.setUrl(url);
//        return dataSource;
//    }
//
////    @Bean
////    public JdbcTemplate getJdbcTemplate() {
//////        return getJdbcTemplate
////    }
//}
